namespace Sedna.Utility.Command
{
    public class CommandResult
	{

		#region Constants

		public const int SUCCESS = 0;
		public const int UNKNOWN_ERROR = -1;
		public const int EMPTY_COMMAND = -2;

		#endregion

		#region Static Fields

		public static readonly CommandResult SuccessResult = new CommandResult(SUCCESS, "Command was completed successfully");
		public static readonly CommandResult ErrorResult = new CommandResult(UNKNOWN_ERROR, "Unknown error");
		public static readonly CommandResult EmptyCommandResult = new CommandResult(EMPTY_COMMAND, "Empty command");

		#endregion

		#region Fields

		private int result;
        private object data;

		#endregion

		#region Properties

		public int Result
        {
            get { return result; }
        }

        public object Data
        {
            get { return data; }
		}

		#endregion

		#region Constructors

		public CommandResult(int result, object data)
        {
            this.result = result;
            this.data = data;
		}

		#endregion

    }
}
